package com.error;

import lombok.Data;

/**
 * @Auther: zwg
 * @Date: 2019/3/5 09:12
 * @Description:
 */
@Data
public class BaseBusinessException extends RuntimeException {
    private Integer code;

    // 给子类用的方法
    public BaseBusinessException(ResponseCodeEnum responseCodeEnum) {
        this(responseCodeEnum.getMessage(), responseCodeEnum.getCode());
    }

    private BaseBusinessException(String message, Integer code) {
        super(message);
        this.code = code;
    }
}
